home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- # Begin $rc_base/init.d/mountfs - File System Mount Script
-
- # Based on mountfs script from LFS-3.1 and earlier.
- # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
-
- . /etc/sysconfig/rc
- . $rc_functions
-
- case "$1" in
- start)
- echo -e -n '\E[32mRemounting root file system in read-write mode'
- echo ""
- mount -n -o remount,rw /
- #evaluate_retval
-
- # Remove fsck-related file system watermarks.
- rm -f /fastboot /forcefsck
-
- echo -e -n '\E[32mRecording existing mounts in /etc/mtab'
- > /etc/mtab
- mount -f / || failed=1
- mount -f /proc || failed=1
- if grep -q '[[:space:]]sysfs' /proc/mounts ; then
- mount -f /sys || failed=1
- fi
- (exit $failed)
- #evaluate_retval
-
- # This will mount all filesystems that do not have _netdev in
- # their option list. _netdev denotes a network filesystem.
- echo -e -n '\E[32mMounting remaining file systems'
- echo ""
- mount -a -O no_netdev
- #evaluate_retval
- ;;
-
- stop)
- echo -e -n '\E[32mUnmounting all other currently mounted file systems'
- umount -d -r -t noramfs
- #evaluate_retval
- ;;
-
- *)
- echo -e -n '\E[32mUsage: $0 {start|stop}'
- echo ""
- exit 1
- ;;
- esac
-
- # End $rc_base/init.d/mountfs
-